package com.quark.common.exception;

import com.quark.result.ResultErrorCode;

/**
 * @author 张高昌
 * @date 2021/10/31 18:40
 * @description TODO
 */
public class CustomException extends RuntimeException {

    private ResultErrorCode resultErrorCode;

    public CustomException(String message) {
        super(message);
    }

    public CustomException(ResultErrorCode resultErrorCode) {
        super(resultErrorCode.getMessage());
        this.resultErrorCode = resultErrorCode;
    }

    public ResultErrorCode getErrorCode() {
        return resultErrorCode;
    }

}
